import React, { Component } from 'react'
import { connect } from 'dva'

@connect(({ dashboard }) => ({
  dashboard
}))
class Dashboard extends Component {
  constructor(props) {
    super(props);
    this.state = {}
  }

  componentDidMount() {
    this.fetchDashboardData()
  }

  fetchDashboardData = () => {
    // console.log(this.props)
    const { dispatch } = this.props
    dispatch({
      type: 'dashboard/fetchDashboard'
    })
  }

  render() {
    return (
      <div>
        Dashboard
      </div>
    );
  }

}

export default Dashboard;
